<?php
ob_start();
session_start();

include("conf/config.php");
include("conf/database.php");
include("conf/tools.php");

$curTime=getIndianDateTime();

foreach($_POST as $key => $value) { $arr_data[$key]=$value;}
foreach($arr_data as $key => $value) { $arr_data[$key]=addslashes($value); }

$memberId=$_SESSION["member_id"];

if($arr_data["seva_location"]==1){
unset($arr_data["from_date"]);
unset($arr_data["to_date"]);
}
else{

}
if($request_id>0){


}
else{
	$arr_data["member_id"]=$memberId;
	$request_id=insert_qry("bkitc_seva_request",$arr_data);
	$member=getMemberInfo($memberId);
	intimateSevaRequest($member);
	writeLog("New Seva : requested by ".$member["full_name"]);
	qry_data("update bkitc_seva_request set req_submitted_date='".$curTime."' where request_id=".$request_id);

}



header("location:sevaapplist.php");

?>

